package cn.imnaer.service.rest.resquest.model;

import java.util.LinkedList;
import java.util.List;

import cn.imnaer.common.factory.JacksonUtil;
import cn.imnaer.service.persistence.model.Collect;

public class CollectParams {

	private String collectGroupId;
    private  String scenicId;
    private String userId;
	public String getScenicId() {
		return scenicId;
	}
	public void setScenicId(String scenicId) {
		this.scenicId = scenicId;
	}


	public String getUserId() {
		return userId;
	}


	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getCollectGroupId() {
		return collectGroupId;
	}


	public void setCollectGroupId(String collectGroupId) {
		this.collectGroupId = collectGroupId;
	}
    public static CollectParams parseToModel(String json) {
        return  JacksonUtil.jsonToBean(json, CollectParams.class);
    }

     public Collect  build(){
    	 Collect  collect=new Collect();
    	 collect.setIsPublic(false);
    	 collect.setUserId(userId);
    	 collect.setGroupId(collectGroupId);
         List<String>  scenicIds=new LinkedList<>();
        scenicIds.add(this.scenicId);
	    collect.setScenicIds(scenicIds);
    	 return collect;
     }
	
  
}
